package cn.edu.nhic.nhcarsb.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import lombok.Data;

import javax.validation.constraints.Min;
import javax.validation.constraints.NotEmpty;

@Data
public class Category extends Base{
    @TableId(value = "cid",type = IdType.AUTO)
    @Min(value = 1,message = "cid必须大于1",groups = {Update.class})
    private int cid;
    @NotEmpty(message = "名称不能为空！",groups = {All.class})
    private String cname;
    @NotEmpty(message = "logo不能为空！",groups = {Save.class})
    private String clogo;
    private Integer deleted;
    private Integer version;
    private String cdesc;
}
